package Ch4;

/**
 * Created by Cai Ye on 2016/3/25.
 */
public class OceanWorld1Submarine implements OceanWorld1Swimmer {
    private String name;

    public OceanWorld1Submarine(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public void swim() {
        System.out.printf("潜水艇 %s 潜行%n", name);
    }
}
